package com.bsbm.common.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;

/**
 * Created with IntelliJ IDEA.
 * User: SABIR IQBAL
 * Date: 2/12/14
 * Time: 12:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class TestBean implements Serializable{   
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String countryCd;
	private String cityCd;
	private List<String> countryCdValues = new ArrayList<String>();
	private List<String> cityCdValues = new ArrayList<String>();

	@PostConstruct
	public void init() {
	    if(countryCdValues.isEmpty()){
	    	countryCdValues.add("India");
	    	countryCdValues.add("USA");
	    	countryCdValues.add("Beng");
	    	countryCdValues.add("UK");
	    }
	}

	public void changeCountry() {
	    if("India".equals(countryCd)){
	    	cityCdValues.clear();
	    	cityCdValues.add("Kolkata");
	    	cityCdValues.add("Bishnupur");
	    } else if("USA".equals(countryCd)){
	    	cityCdValues.clear();
	    	cityCdValues.add("Phoenix");
	    	cityCdValues.add("Gelndale");
	    } else if("Beng".equals(countryCd)){
	    	cityCdValues.clear();
	    	cityCdValues.add("Dhaka");
	    	cityCdValues.add("Sodpur");
	    }
	}

	public String getCountryCd() {
		return countryCd;
	}

	public void setCountryCd(String countryCd) {
		this.countryCd = countryCd;
	}

	public List<String> getCountryCdValues() {
		return countryCdValues;
	}

	public void setCountryCdValues(List<String> countryCdValues) {
		this.countryCdValues = countryCdValues;
	}

	public List<String> getCityCdValues() {
		return cityCdValues;
	}

	public void setCityCdValues(List<String> cityCdValues) {
		this.cityCdValues = cityCdValues;
	}

	public String getCityCd() {
		return cityCd;
	}

	public void setCityCd(String cityCd) {
		this.cityCd = cityCd;
	}
   
    public String save() {
        return "success";
    }


	
}
